A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
The present invention generally relates to the field of object-oriented programming and in particular to a method for converting metamodels residing in the same or different repositories.
Repositories provide a central place for recording metadata and enable one to store, manage, share and reuse information about data (i.e., metadata) that an enterprise uses. A repository can store definitional, management and operational information. Tools can be integrated with the repository to support information sharing and metadata reuse, and tool and technology models may be developed to manipulate the tool information in the repository. However, the transferring of data within models from tool to tool or from a tool to the repository has been a cumbersome and unyielding task for a long time.
A repository contains groups of metadata called models. A special kind of model, called a metamodel, describes the contents of other models. Metamodels typically contain classes, associations or references, and datatypes.
There are different kinds of metamodels supported by different kinds of repositories. One important way of defining metamodels is provided by the Repository Services Model (RSM). The RSM has been in use for a long time and has been used to define countless metamodels. A newer means of defining metamodels is provided by the Metaobject Facility (MOF). The MOF is standardized and is supported by many new repositories.
Metamodels defined for both RSM and MOF are designed using UML (Unified Modeling Language). But RSM and MOF are substantially different. There is a need to convert metamodels that have been based on RSM to work with MOF. In the past, conversion between RSM-based metamodels and MOF-based metamodels has been ad hoc and manual. There is a need for a method to automate the process of converting metamodels between RSM and MOF.
Further, RSM""s versioning service requires multiplicities on compositions to be invalid for MOF-based metamodels. This incompatibility creates a need for automating the transition of multiplicity constraints in a way that preserves the intent of metamodel designers.
Also, directly mapping an RSM-based metamodel to a MOF-based metamodel apart from UML looses diagrammatic design details. It is important to have a method of conversion that works in the context of UML so as to preserve UML diagrams.
It is an object of the present invention to provide an automatic method for converting a UML rendering of an RSM-based metamodel to a UML rendering of a MOF-based metamodel.
Another object of the present invention is to provide a method that maps RSM-based metamodel to MOF-based metamodels following a consistent pattern.
Another object of the present invention is to provide a method that automatically detects and resolves composition multiplicity problems caused by RSM versioning.
And yet another object of the present invention is to provide a method that preserves UML diagrams of RSM-based metamodels when converting to MOF-based metamodels.
These and other objects, which will become apparent as the invention is described in detail below, are provided by a computer-implemented method for converting a UML rendering of an RSM-based metamodel to a UML rendering of a MOF-based metamodel. The method includes the steps of removing inheritance from classes defined within a Repository Services Model (xe2x80x9cRSMxe2x80x9d) and removing each explicit xe2x80x9cconstructxe2x80x9d operation from each class in the RSM-based metamodel Next, each use in the RSM-based metamodel of an RSM type is changed to use a non-RSM type. After this, each element of the RSM-based metamodel is converted to a corresponding MOF-based element and a determination is made as to whether or not the RSM naming service is used in the RSM-based metamodel, and if so xe2x80x9cnamexe2x80x9d attributes are added that would have been inherited from the RSM classes. A  less than  less than metamodel greater than  greater than  stereotype is added to the UML rendering of the MOF-based metamodel; and the MOF properties are set on the UML rendering.
Still other objects, features and advantages of the present invention will become readily apparent to those skilled in the art from the following detailed description, wherein is shown and described only the preferred embodiment of the invention, simply by way of illustration of the best mode contemplated of carrying out the invention. As will be realized, the invention is capable of other and different embodiments, and its several details are capable of modifications in various obvious respects, all without departing from the invention. Accordingly, the drawings and description are to be regarded as illustrative in nature, and not as restrictive, and what is intended to be protected by Letters Patent is set forth in the appended claims. The present invention will become apparent when taken in conjunction with the following description and attached drawings, wherein like characters indicate like parts, and which drawings form a part of this application.